<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/MebCoupon.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/mebcoupon.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '优惠券模板',
                    name: 'MebCoupon',
                    url: "/MebCoupon/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {},
                editFormOptions: [],
                searchFormFields: {name:""},
                searchFormOptions: [
                    [{"title":"优惠券模板名称","field":"name","type":"like"},
                    {"title":"券类型","field":"type","type":"select",dataKey:"Coupon_Type",data: []}
                    ]],
                columns: [
                       {field:'name',title:'优惠券模板名称',type:'string',width:120,align:'left'},
                       {field:'type',title:'券类型',type:'int',width:120,align:'left',sortable:true, bind: {key:"Coupon_Type", data: []}},
                       {field:'applicability',title:'适用范围',type:'int',width:120,align:'left',bind: { data:[{key:1,value:"通用"},{key:2,value:"品类"},{key:3,value:"商品"},{key:4,value:"商户"}]}},
                      {field:'receive_way',title:'是否领取',type:'int',width:120,align:'left',bind: { key:'',data:[{key:1,value:"是"},{key:0,value:"否"}]}},
                      {field:'applicable_people',title:'适用人群',type:'int',width:120,align:'left',bind: { key:'',data:[{key:1,value:"全部"},{key:2,value:"特定"}]}},
                       {field:'creator',title:'创建人',type:'string',width:120,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:170,align:'left',sortable:true}
                       ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                },
            };
        },
    };
    export default vueParam;
</script>
